package com.doge.walknovel.business.home.library

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.doge.walknovel.core.base.adapters.AdapterCallback
import com.doge.wnpro.databinding.CellLibraryAddBinding
import com.doge.walknovel.utils.setOnClickCallback

class LibraryAddViewHolder(
    parent: ViewGroup,
    callback: AdapterCallback,
    private val binding: CellLibraryAddBinding = CellLibraryAddBinding.inflate(
        LayoutInflater.from(parent.context), parent, false),
) : RecyclerView.ViewHolder(binding.root) {
    init {
        binding.add.setOnClickCallback {
            callback.invoke(BOOK_ADD, itemView.tag)
        }
    }
}